<%@ page language="java" pageEncoding="UTF-8"%>
<div class="container">
	<div>
		<h3 style="color: #40AA53;">
			发表讨论
		</h3>
		<hr />
		
		<div class="pull-right alert alert-info">
			提问和发帖必读<br/>
			<hr/>
			<ul>
				<li>
					跟技术无关的问题请不要在此发布
				</li>
				<li>
					上传真实头像，可使问题获更好排位
				</li>
				<li>
					模糊或过于简单的标题会被降低排位
				</li>
			</ul>
		</div>
		
		<div class="col-lg-8">
			<form role="form" callback="save" validate>
				<div class="form-group">
					<label>
						标题
					</label>
					<input type="text" class="form-control" placeholder="请输入标题" name="title" ng-model="discuss.title" rule="required;length[5~100]">
				</div>
				<div class="form-group">
					<label>
						板块
					</label>
					<br/>
					<!-- <select class="form-control" ng-model="discuss.forum" rule="required;">
						<option ng-repeat="forum in forums" value="{{forum.id}}" ng-selected="forum.id==discuss.forum">
							{{forum.name}}
						</option>
					</select> -->

					<div class="btn-group"> <!--  data-toggle="buttons" -->
						<label class="btn btn-default" ng-repeat="forum in forums">
							<input type="radio" name="forum" value="{{forum.id}}" ng-model="discuss.forum" /> {{forum.name}}
						</label>
					</div>
				</div>
				<div class="form-group">
					<label>
						标签<i class="glyphicon glyphicon-exclamation-sign" message="'最多5个标签'" tooltip></i>
					</label>
					<div class="input-group" style="width:100%;">
						<input style="width:18%;margin-right: 10px;" type="text" class="form-control" name="tag_1" ng-model="discuss.tag_1" rule="length[1~20]">
						<input style="width:18%;margin-right: 10px;" type="text" class="form-control" name="tag_2" ng-model="discuss.tag_2" rule="length[1~20]">
						<input style="width:18%;margin-right: 10px;" type="text" class="form-control" name="tag_3" ng-model="discuss.tag_3" rule="length[1~20]">
						<input style="width:18%;margin-right: 10px;" type="text" class="form-control" name="tag_4" ng-model="discuss.tag_4" rule="length[1~20]">
						<input style="width:18%;margin-right: 10px;" type="text" class="form-control" name="tag_5" ng-model="discuss.tag_5" rule="length[1~20]">
					</div>
				</div>
				<div class="form-group">
					<label>
						内容
					</label>
					<textarea name="content" rule="required;length[5]" ng-model="discuss.content" editor-width="100%;" delay="0" editor></textarea>
				</div>
				<button type="submit" class="btn btn-success btn-sm">
					<i class="glyphicon glyphicon-ok-sign"></i> 发表
				</button>
			</form>
		</div>
	</div>
</div>